package main

import (
	"encoding/json"
	"fmt"
	"os"
)

type location struct {
	Lat  float64 `json:"lat"`
	Long float64 `json:"long"`
}

func main() {
	curiosity := location{Lat: -4.5656, Long: 4.34343}
	bytes, err := json.Marshal(curiosity)
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	fmt.Println(string(bytes))

	byte1s, err := json.MarshalIndent(curiosity, "	", "")
	fmt.Println(string(byte1s))
}
